package com.zys.properties;

import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Data
@Component
@ConfigurationProperties(prefix = "sftp")
public class SftpProperties {
    private static final Logger logger = LoggerFactory.getLogger(SftpProperties.class);

    private String host;
    private Integer port;
    private String username;
    private String password;
    private String remotePath;

    @PostConstruct
    public void init(){
        logger.info("SFTP Properties loaded -> Host: {}, Port: {}, Username: {},Password:{} Remote Path: {}",
                host, port, username,password, remotePath);
    }
}
